/*********************************************************************************
easyZenImport v.8b - Easy, Ajax Driven Importing Front-End For EasyPopulate 
Copyright (C) 11-02-06 Nick Van Dorsten
Author: Nick Van Dorsten <nickvd@gmail.com>

This library is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or (at your option) any later
version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
*********************************************************************************/
var queryString = {
   get: function (key,qs){
      if (typeof(this.params) != 'object') this.qsParse(qs);
      return this.params[key];
   },
   qsParse: function (qs){
      if (qs == null) qs=location.search.substring(1,location.search.length);
      if (qs.length == 0) return;
   
      qs = qs.replace(/\+/g, ' ');
      var args = qs.split('&');
      this.params = new Object();
      for (var i=0;i<args.length;i++) {
         var value;
         var pair = args[i].split('=');
         var name = unescape(pair[0]);
   
         if (pair.length == 2) value = unescape(pair[1]);
         else value = name;
         
         this.params[name] = value;
      };
   }
}